package com.gopay.common.cps.dao.cbrmb.impl;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.cbrmb.CbRmbImportLedgerDtlDAO;
import com.gopay.common.domain.cbrmb.CbRmbImportLedgerDtl;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName CbRmbImportLedgerDtlDAOImpl
 * @Author b.zou
 * @Date 2017-7-24
 * @Copyright ©www.gopay.com.cn Inc.All rights reserved.
 */
@Repository(value = "cbRmbImportLedgerDtlDAO")
public class CbRmbImportLedgerDtlDAOImpl extends BaseDAOImpl<CbRmbImportLedgerDtl,Serializable>  implements CbRmbImportLedgerDtlDAO{

    @Override
    public List<CbRmbImportLedgerDtl> findListByTransDtlSq(Integer transDtlSq) {
        String hql = " from CbRmbImportLedgerDtl t where t.transDtlSq=:transDtlSq order by t.createTime asc";
        Map<String, Object> params = new HashMap<>();
        params.put("transDtlSq",transDtlSq);
        List<CbRmbImportLedgerDtl> list = findByHql(hql, params);
        if(list.size()>0){
            return list;
        }else{
            return null;
        }
    }


}
